<template>
	<view class="tagWrap" :style="{ 'background': checkDengji() }">
		<image class="iconZuanshi" src="../../../../static/img/icon_zuanshi.png" mode=""></image>
		<text class="tagName">{{ props.partnerLevel?.anme }}</text>
	</view>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import NavBar from '@/components/navBar.vue';

const props = defineProps({
	partnerLevel: {
		type: Object
	}
});

const checkDengji = () => {
	if (props?.partnerLevel?.value == 'LEVEL_1') {
		return 'linear-gradient( 90deg, #F99909 0%, #FF9E0C 100%);';
	} else if (props?.partnerLevel?.value == 'LEVEL_2') {
		return 'linear-gradient( 90deg, #F8D18E 0%, #CEA063 100%)';
	} else if (props?.partnerLevel?.value == 'LEVEL_3') {
		return 'linear-gradient( 90deg, #FFE825 0%, #FFE220 100%)';
	}
};
</script>

<style lang="scss" scoped>
.tagWrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 206rpx;
	height: 50rpx;
	background: linear-gradient(90deg, #ffe825 0%, #ffe220 100%);
	border-radius: 12rpx 12rpx 12rpx 12rpx;
	margin-top: 8rpx;
}

.iconZuanshi {
	width: 42rpx;
	height: 42rpx;
}

.tagName {
	font-weight: normal;
	font-size: 28rpx;
	color: #af3900;
	text-align: center;
	font-style: normal;
	text-transform: none;
	margin-left: 4rpx;
}
</style>
